package cn.life.business.user.dao.impl;

import cn.life.business.user.entity.vo.LoginUserVo;
import cn.life.business.user.entity.vo.LoginVo;
import cn.life.business.user.entity.vo.UserInfoVo;
import cn.life.common.dao.CommonDao;
import cn.life.common.entity.model.CMessage;
import cn.life.common.entity.vo.Pagination;
import cn.life.common.support.jdbc.AbstractSupportDao;
import cn.life.business.user.dao.UserDao;
import cn.life.business.user.entity.po.LoginUser;
import cn.life.business.user.entity.po.UserInfo;
import cn.life.business.user.entity.vo.RegisterUserVo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author 李佳明
 * @Date 2018/7/5 0005.6:59.
 */
@Repository
public class UserDaoImpl extends AbstractSupportDao implements UserDao{

    @Resource
    private CommonDao commonDao;

    @Override
    public UserInfo queryUserInfo(LoginVo loginVo) {
        String sql = "select a.user_id,a.user_name,a.state from user_info a where a.user_id = ? and a.pin = ?";
        return queryForObject(sql,UserInfo.class,loginVo.getUserId(),loginVo.getPin());
    }
}
